package com.zhang.controller;


import com.zhang.domain.User;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@Api(tags = {"User控制器别名1","User控制器别名2"})
@RestController
@RequestMapping("/user")
public class UserController {

    @ApiOperation(value = "方法别名",notes = "方法的描述")
    @GetMapping("/regiest")
    public String regiest(){

        return "a";
    }

    @PostMapping("/login")
    public User login(@ApiParam(name = "参数别名",value = "描述",example = "演示数据",required = true) String username, String password){

        User user = new User(username,password);

        return user;
    }

    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "m",value = "描述",required = true,paramType = "字符串",dataType = "数据类型"),
            @ApiImplicitParam(name = "n",value = "描述",required = true,paramType = "int类型",dataType = "数据类型")
    })
    @GetMapping("/getUser")
    public String getUser(String m ,int n){

        return "user";
    }


}









